home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / earcd / -archivi / -recent2 / ged_scripts.lha / GED_Scripts / InsertClassname.rexx < prev    next >
OS/2 REXX Batch file  |  1998-12-22  |  1KB  |  43 lines

  1. /* $VER: InsertClassname.rexx 1.1 (22.12.98)    */
  2. /* Freeware, ©1998 Christian Hattemer           */
  3. /* email: Chris@mail.riednet.wh.tu-darmstadt.de */
  4. /*                                              */
  5. /* Inserts the Name of the Class                */
  6.  
  7. options results                             /* enable return codes     */
  8.  
  9. if (left(address(), 6) ~= "GOLDED") then    /* not started by GoldEd ? */
  10.  
  11.     address 'GOLDED.1'
  12.  
  13. 'LOCK CURRENT RELEASE=4'                    /* lock GUI, gain access   */
  14.  
  15. if (RC ~= 0) then
  16.  
  17.     exit
  18.  
  19. options failat 6                            /* ignore warnings         */
  20.  
  21. signal on syntax                            /* ensure clean exit       */
  22.  
  23. /* ---------------------- INSERT YOUR CODE HERE ---------------------- */
  24.  
  25. 'QUERY FILE VAR=Filename'
  26. Classname = LEFT(Filename, LASTPOS('.c', Filename) -1)
  27.  
  28. 'SET NAME=INSERT VALUE=TRUE'
  29.  
  30. 'TEXT T="'Classname'"'
  31.  
  32. /* ------------------------- END OF YOUR CODE ------------------------ */
  33.  
  34. 'UNLOCK'                                    /* unlock GUI              */
  35.  
  36. exit
  37.  
  38. SYNTAX:
  39.  
  40. SAY "Error in line" SIGL ":" ERRORTEXT(RC)
  41.  
  42. 'UNLOCK'
  43.